{"ast":null,"code":"/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport default function extractEventHandlers(object) {\n  var excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  if (object === undefined) {\n    return {};\n  }\n  var result = {};\n  Object.keys(object).filter(function (prop) {\n    return prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop);\n  }).forEach(function (prop) {\n    result[prop] = object[prop];\n  });\n  return result;\n}","map":{"version":3,"names":["extractEventHandlers","object","excludeKeys","undefined","result","Object","keys","filter","prop","match","includes","forEach"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/utils/extractEventHandlers.js"],"sourcesContent":["/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport default function extractEventHandlers(object, excludeKeys = []) {\n  if (object === undefined) {\n    return {};\n  }\n\n  const result = {};\n  Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n    result[prop] = object[prop];\n  });\n  return result;\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,oBAAoB,CAACC,MAAM,EAAoB;EAAA,IAAlBC,WAAW,uEAAG,EAAE;EACnE,IAAID,MAAM,KAAKE,SAAS,EAAE;IACxB,OAAO,CAAC,CAAC;EACX;EAEA,IAAMC,MAAM,GAAG,CAAC,CAAC;EACjBC,MAAM,CAACC,IAAI,CAACL,MAAM,CAAC,CAACM,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,KAAK,CAAC,UAAU,CAAC,IAAI,OAAOR,MAAM,CAACO,IAAI,CAAC,KAAK,UAAU,IAAI,CAACN,WAAW,CAACQ,QAAQ,CAACF,IAAI,CAAC;EAAA,EAAC,CAACG,OAAO,CAAC,UAAAH,IAAI,EAAI;IAC9IJ,MAAM,CAACI,IAAI,CAAC,GAAGP,MAAM,CAACO,IAAI,CAAC;EAC7B,CAAC,CAAC;EACF,OAAOJ,MAAM;AACf"},"metadata":{},"sourceType":"module"}